package com.z.admin.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.z.admin.entity.Tag;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author z
 * @since 2022-04-11
 */
public interface TagMapper extends BaseMapper<Tag> {
    @Select("select count(*) from t_tag")
    Integer conutAll();

    @Select("select * from t_tag t order by t.id limit #{startPosition} , #{limit}")
    List<Tag> findTagByPage(@Param("startPosition") Integer startPosition, @Param("limit") Integer limit);

}
